//
//  SYS_PublicButton.m
//  System_App
//
//  Created by 魏配军 on 2017/11/29.
//  Copyright © 2017年 czy001. All rights reserved.
//

#import "SYS_PublicButton.h"

@implementation SYS_PublicButton

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self=[super initWithFrame:frame]) {
        [self addView];
    }
    return self;
    
}

-(void) addView
{
    _iconImageView1=[UIImageView new];
    
    _nameLabel=[[UILabel alloc]init];
    _nameLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:16];
    _nameLabel.font=[UIFont systemFontOfSize:18];
    _nameLabel.textAlignment=NSTextAlignmentLeft;
    _nameLabel.textColor = MainColor;
    
    [self sd_addSubviews:@[_iconImageView1,_nameLabel]];
    
    _iconImageView1.sd_layout
    .leftSpaceToView(self, (self.width-65)/2)
    .topSpaceToView(self, (self.height-20)/2)
    .widthIs(20)
    .heightIs(20);
    
    _nameLabel.sd_layout
    .leftSpaceToView(_iconImageView1, 5)
    .topSpaceToView(self, (self.height-20)/2)
    .widthIs(40)
    .heightIs(20);

}


@end
